Skip to content

Add --target flag to update-package-locks.sh - #298

Open
xyos wants to merge 1 commit into
mainfrom
tooling/update-package-locks-target-flag
Open

Add --target flag to update-package-locks.sh#298
xyos wants to merge 1 commit into
mainfrom
tooling/update-package-locks-target-flag

Conversation

@xyos

@xyos xyos commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Issue

Description of Changes

Adds a repeatable --target <target> flag to scripts/update-package-locks.sh so a single build target's package-lock overrides can be regenerated without running prepare-src + npm install for all four targets.

  • No arguments: unchanged behavior (all four targets, then unified OSS attribution).
  • --target <t> (repeatable): processes only the named target(s). Target names are validated against configuration/*.json; unknown names fail fast with the list of valid targets.
  • The unified OSS attribution step requires all four prepared source trees, so it is skipped when not all targets are processed. A note tells the user to run the full script or generate-oss-attribution.sh separately. Prepared directories are still cleaned up.

This shortens the loop when a change only affects one target's lockfiles (for example a dependency override that only needs the sagemaker lock regenerated).

Testing

  • bash -n passes.
  • ./scripts/update-package-locks.sh --target bogus-target exits 1 immediately with the list of valid targets.
  • Sandbox run with stubbed prepare-src.sh, npm, and generate-oss-attribution.sh verified all four paths:
    • one --target: target processed, attribution skipped with the note, prepared dirs cleaned up;
    • two --target flags: attribution skipped;
    • all four targets passed via flags: attribution runs;
    • no arguments: identical to previous behavior (all targets, attribution runs).

Screenshots/Videos

Additional Notes

Backporting

Not needed; developer tooling only.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@xyos
xyos requested a review from a team as a code owner August 8, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant